![]() |
PATH![]() |
![]() ![]() |
Here's how to declare a tab title drawing function, if you were to name the function MyThemeTabTitleDrawProc :
pascal void MyThemeTabTitleDrawProc (
const Rect *bounds,
ThemeTabStyle style,
ThemeTabDirection direction,
SInt16 depth,
Boolean isColorDev,
UInt32 userData);
At the time your tab title drawing function is called, the foreground text color and mode is already set to draw in the correct state (active or inactive) and correct color for the theme. You do not need to set the color unless you have special drawing needs. If you do have special drawing needs, you should supply the depth value and the value of the isColorDevice parameter to the function IsThemeInColor to determine whether or not you should draw the tab title content in color. Note that the Appearance Manager calls your MyThemeTabTitleDrawProc function for every device that the bounds rectangle intersects.
The Appearance Manager draws the tab background prior to calling your tab title drawing function, so you should not erase the tab background from your title drawing function.